package cn.wolfcode.wolf2w.respository;

import cn.wolfcode.wolf2w.domain.UserInfo;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 用户持久化操作接口
 */
@Repository
public interface UserInfoRepository extends MongoRepository<UserInfo, String> {


    /**
     * 通过手机号查询用户对象
     * @param phone
     * @return
     */
    UserInfo findByPhone(String phone);


    List<UserInfo> queryByCity(String name);
}
